<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>物料管理</title>
<link href="__PUBLIC__/admin/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.js"></script>
<link href="__PUBLIC__/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/select-ui.min.js"></script>

<link href="__PUBLIC__/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="__PUBLIC__/validform/Validform_Datatype.js"></script>
<script type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>
<script>
	$(document).ready(function(e) {
		$("#indus_id,#item_province,#item_city").uedSelect({
			width : 100
		});

		if("{$item_province}".length>0 ){
			showcity("{$item_province}");//初始化市
		}
	});

	function showcity(province){
		$("#item_city").empty();
		if(province.length>0){
			$("#item_city").append("<option value='' selected>请选择市</option>");
			if("{$item_city}".length>0 && "{$item_province}"==province){
				$("#item_city").prev().find(".uew-select-text").html("{$item_city}");
			}else{
				$("#item_city").prev().find(".uew-select-text").html("请选择市");
			}
			$.getJSON("{:U('itemrate/getcity')}&province="+province,function(result){
				var data=result.data;
				$.each(data, function(i, v){
					if("{$item_city}"==v['city']){
						$("#item_city").append("<option value='"+v['city']+"' selected>"+v['city']+"</option>");
					}else{
						$("#item_city").append("<option value='"+v['city']+"'>"+v['city']+"</option>");
					}
				});
			});
		}
	}
</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="{:U('index/welcome')}">首页</a></li>
			<li><a href="{:U('Iteminfo/index')}">项目信息展示</a></li>
		</ul>
    </div>
    
    <div class="formbody">
		<ul class="toolbar">

		</ul>
		<form name="seachform" id="seachform" action="{:U('itemrate/iteminfo')}" method="post">
			<ul class="seachform">
				<li><label>综合查询</label><input name="info[keyword]" id="keyword" value="{$keyword}" type="text" class="scinput" style="width:100px;" /></li>
				<li><label>提交时间</label>
					<input name="info[starttime]" id="starttime" class="dfinput" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{ $dp.$D(\'endtime\')||\'2100-10-01\' }'})" datatype="*" errormsg="时间范围开始值不能为空！" maxlength="20" style="width: 100px;" readonly value="{$starttime}" />-
					<input name="info[endtime]" id="endtime" class="dfinput" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'starttime\') }',maxDate:'2100-10-01'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 100px;" readonly value="{$endtime}" />
					<i class="Validform_checktip"></i></li>
				<li><label>行业分类</label>
					<div class="vocation">
						<select id="indus_id" name="info[indus_id]" datatype="*" errormsg="行业分类不能为空！">
							<option value="" selected>请选择行业分类</option>
							<volist name="indusinfo" id="data" key="key">
								<option value="{$data.indus_id}" <if condition="$data.indus_id eq $indus_id">selected</if> <if condition="$data.childnum gt 0">disabled</if>>{$data.indus_title}</option>
								<if condition="$data.childnum gt 0">
									<volist name="data.child" id="child" key="keyc">
										<option value="{$child.indus_id}" <if condition="$child.indus_id eq $indus_id">selected</if>>--{$child.indus_title}</option>
									</volist>
								</if>
							</volist>
						</select></div><i class="Validform_checktip"></i></li>
				<li><label>地域信息</label>
					<div class="vocation">
						<select id="item_province" name="info[item_province]" datatype="*" errormsg="省不能为空！" onchange="showcity(this.value);">
							<option value="" selected>请选择省</option>
							<volist name="provinces" id="data" key="key">
								<option value="{$data.province}" <if condition="$data.province eq $item_province">selected</if>>{$data.province}</option>
							</volist>
						</select>
					</div>
					<div class="vocation" style="padding-left:10px;">
						<select id="item_city" name="info[item_city]" datatype="*" errormsg="市不能为空！">
							<option value="">请选择市</option>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>

				<li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
			</ul>
		</form>


		<table class="tablelist">
			<thead>
				<tr>
					<th><input name="" type="checkbox" value="" /></th>
					<th>编号</th>
					<th>项目名称</th>
					<th>公司名称</th>
					<th>联系人</th>
					<th>联系电话</th>
					<th>区域</th>
					<th>行业</th>
					<th>分值</th>
					<th>提交时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<volist name="listinfo" id="item">
				<tr>
					<td><input name="" type="checkbox" value="" /></td>
					<td>{$item.item_id}</td>
					<td>{$item.item_name}</td>
					<td>{$item.item_company}</td>
					<td>{$item.item_linkmen}</td>
					<td>{$item.item_linkphone}</td>
					<td>{$item.item_province}{$item.item_city}</td>
					<td>{$item.indus_title}</td>
					<td>{$item.score}</td>
					<td>{$item.item_addtime|date="Y-m-d H:i:s",###}</td>
					<td>
						<a href="{:U('iteminfo/edititem',array('item_id'=>$item['item_id']))}" class="tablelink">编辑/查看</a>
						<a href="{:U('iteminfo/delitem',array('item_id'=>$item['item_id']))}" onclick="{if(confirm('确认删除此条项目信息?')){return true;}return false;}" class="tablelink">删除</a>
					</td>
				</tr> 
				</volist>
			</tbody>
		</table>

		{$pageshow}

    </div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>

</html>
